<?php
// pr($team);
// pr($tournaments);
?>


<div class="row">
	<div class="col-md-12">
		<h1 class="text-center"><?php echo __("Storico calcio") . " " . $tournaments["0"]['Tournament']['country']; ?></h1>
		<h2 class="text-center">
			<?php if (isset($team) && !empty($team)) {
				 echo $tournaments["0"]['Tournament']['league']." ".$tournaments["0"]['Tournament']['season']." ".$team["Team"]["name"] ; 
			} else {
				 echo $tournaments["0"]['Tournament']['league']." ".$tournaments["0"]['Tournament']['season'] ; 
			} ?>
			
		</h2>
	</div>
	<div class="col-md-12">
		
		
		<?foreach ($tournaments as $tournament) { ?>
	        <div class="tournament">
	                <div class="header-tournament-live">
						<a href="<?php echo $this->webroot.Configure::read("Config.lang").'/matches/'.$tournament['Tournament']['country_slug'].'/'.$tournament['Tournament']['league_slug'].'/'.$tournament['Tournament']['season_slug'].'/'.$tournament['Tournament']['week']; ?>">
		                    <div class="country col-md-12"><?php echo $tournament['Tournament']['description']; ?></div>
						</a>
	                </div>
	                <div class="body-tournament-live">
				      <div class="match">
	                	<?php echo $this->element('match',array("tournament"=>$tournament)); ?>
	                  </div>
	                </div>
	        </div>
		<? } ?> 
			
	</div>
</div>